<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="html" uri="http://struts.apache.org/tags-html"%>
<%@ taglib prefix="bean" uri="http://struts.apache.org/tags-bean"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>


<%@page import="org.springframework.web.context.request.SessionScope"%>
<script type="text/javascript">
	/**
	* Set the Radio-Buttons Invisble
	*/
	function invisbleRadio() {
		// do nothing
	}

	/**
	 * Deactivates the show, edit and delete button.
	 */
	function deactivateButtons() {
		// do nothing
	}
</script>

<html:form action="/adCreateEditEquipment" method="post" enctype="multipart/form-data">
	<table>
			<tr>
				<td><b><bean:message key="label.modelName" />:</b></td>
				<td><html:text property="equipment.modelName" /> <span class="validateError"><html:errors property="equipment.modelName" /></span></td>
			</tr><tr>
				<td><b><bean:message key="label.yearOfManufacture" />: </b></td>
				<td><html:text property="equipment.yearOfManufacture" /> <span class="validateError"><html:errors property="equipment.yearOfManufacture" /></span></td>
				</tr><tr>
				<td><b><bean:message key="label.manufactureCompany" />:</b></td>
				<td><html:text property="equipment.manufactureCompany" /> <span class="validateError"><html:errors property="equipment.manufactureCompany" /></span></td>
			</tr><tr>
				<td><b><bean:message key="label.descriptionText" />:</b></td>
				<td><html:textarea property="equipment.descriptionText" /></td>
			</tr><tr>
				<td><b><bean:message key="label.image" />:</b></td>
				<td><html:file property="aEquipmentImageFile" /></td>
			</tr><tr>
				<td><b><bean:message key="label.linkedCars" />:</b></td>				
			<td>
			  	<c:forEach var="carName" items="${sessionScope.equipmentForm.selectedCarNames}"
						varStatus="rowStatus">
						${carName}<br />
					</c:forEach>
				</td>
			</tr>
	</table>
	<html:submit>
		<bean:message key="button.save" />
	</html:submit>
	<html:button property="method" onclick="history.back();">
		<bean:message key="button.back" />
	</html:button>
</html:form>